<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">
  <meta name="google-site-verification" content="yF8HXsFuCTrePDFRnSkN2kkzV2ypBjtywzXsfVXOOV8">
  <meta name="baidu-site-verification" content="VxrVAiQAZ9">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"yang0033.gitee.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":true,"preload":true},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="本文是对已有的版本更新工具做了ios6至ios7的兼容扩展，其使用方法与原项目工具类似，详细可参照下面的介绍。  中文版： Harpy（兼容版）git地址：https:&#x2F;&#x2F;github.com&#x2F;yangchao0033&#x2F;Harpy ###(iOS5-9适配版本,基于ArtSabintsev&#x2F;Harpy v3.4.5) 提醒用户你的应用有新的可用版本，并且及时的跳转到App Store进行更新。关">
<meta property="og:type" content="article">
<meta property="og:title" content="为Harpy（ios版本更新工具)制做兼容版本">
<meta property="og:url" content="http://yang0033.gitee.io/2016/01/11/%E4%B8%BAHarpy%EF%BC%88ios%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E5%B7%A5%E5%85%B7)%E5%88%B6%E5%81%9A%E5%85%BC%E5%AE%B9%E7%89%88%E6%9C%AC/index.html">
<meta property="og:site_name" content="SuperYang&#96;s Blog">
<meta property="og:description" content="本文是对已有的版本更新工具做了ios6至ios7的兼容扩展，其使用方法与原项目工具类似，详细可参照下面的介绍。  中文版： Harpy（兼容版）git地址：https:&#x2F;&#x2F;github.com&#x2F;yangchao0033&#x2F;Harpy ###(iOS5-9适配版本,基于ArtSabintsev&#x2F;Harpy v3.4.5) 提醒用户你的应用有新的可用版本，并且及时的跳转到App Store进行更新。关">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://github.com/yangchao0033/Harpy/blob/master/samplePictures/4.pic.jpg?raw=true">
<meta property="og:image" content="https://github.com/yangchao0033/Harpy/blob/master/samplePictures/5.pic.jpg?raw=true">
<meta property="og:image" content="https://github.com/yangchao0033/Harpy/blob/master/samplePictures/3.pic.jpg?raw=true">
<meta property="og:image" content="http://upload-images.jianshu.io/upload_images/1445110-070d34ccae81dc53.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240">
<meta property="og:image" content="http://upload-images.jianshu.io/upload_images/1445110-7670e9cddf512bd2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240">
<meta property="og:image" content="https://github.com/ArtSabintsev/Harpy/blob/master/samplePictures/picForcedUpdate.png?raw=true">
<meta property="og:image" content="https://github.com/ArtSabintsev/Harpy/blob/master/samplePictures/picOptionalUpdate.png?raw=true">
<meta property="og:image" content="https://github.com/ArtSabintsev/Harpy/blob/master/samplePictures/picSkippedUpdate.png?raw=true">
<meta property="article:published_time" content="2016-01-11T10:26:00.000Z">
<meta property="article:modified_time" content="2020-07-09T08:01:28.191Z">
<meta property="article:author" content="SuperYang">
<meta property="article:tag" content="版本更新提示">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://github.com/yangchao0033/Harpy/blob/master/samplePictures/4.pic.jpg?raw=true">

<link rel="canonical" href="http://yang0033.gitee.io/2016/01/11/%E4%B8%BAHarpy%EF%BC%88ios%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E5%B7%A5%E5%85%B7)%E5%88%B6%E5%81%9A%E5%85%BC%E5%AE%B9%E7%89%88%E6%9C%AC/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>为Harpy（ios版本更新工具)制做兼容版本 | SuperYang`s Blog</title>
  
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-71812998-3"></script>
    <script>
      if (CONFIG.hostname === location.hostname) {
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'UA-71812998-3');
      }
    </script>


  <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?8ff3295288514de6f89f314c23ee40ab";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">SuperYang`s Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">落魄程序员在线炒饭</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-message">

    <a href="/message/" rel="section"><i class="fa fa-music fa-fw"></i>留言板 | Music</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://yang0033.gitee.io/2016/01/11/%E4%B8%BAHarpy%EF%BC%88ios%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E5%B7%A5%E5%85%B7)%E5%88%B6%E5%81%9A%E5%85%BC%E5%AE%B9%E7%89%88%E6%9C%AC/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://tva2.sinaimg.cn/crop.259.17.290.290.180/c2abdfa9jw8ez7appr3p2j20g40a2t91.jpg?KID=imgbed,tva&Expires=1594186820&ssig=BdxhDdi1Ti">
      <meta itemprop="name" content="SuperYang">
      <meta itemprop="description" content="牛肉炒饭不要香菜，老板收钱">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="SuperYang`s Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          为Harpy（ios版本更新工具)制做兼容版本
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2016-01-11 18:26:00" itemprop="dateCreated datePublished" datetime="2016-01-11T18:26:00+08:00">2016-01-11</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2020-07-09 16:01:28" itemprop="dateModified" datetime="2020-07-09T16:01:28+08:00">2020-07-09</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/iOS/" itemprop="url" rel="index"><span itemprop="name">iOS</span></a>
                </span>
            </span>

          
            <span id="/2016/01/11/%E4%B8%BAHarpy%EF%BC%88ios%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E5%B7%A5%E5%85%B7)%E5%88%B6%E5%81%9A%E5%85%BC%E5%AE%B9%E7%89%88%E6%9C%AC/" class="post-meta-item leancloud_visitors" data-flag-title="为Harpy（ios版本更新工具)制做兼容版本" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="far fa-comment"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2016/01/11/%E4%B8%BAHarpy%EF%BC%88ios%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E5%B7%A5%E5%85%B7)%E5%88%B6%E5%81%9A%E5%85%BC%E5%AE%B9%E7%89%88%E6%9C%AC/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2016/01/11/%E4%B8%BAHarpy%EF%BC%88ios%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E5%B7%A5%E5%85%B7)%E5%88%B6%E5%81%9A%E5%85%BC%E5%AE%B9%E7%89%88%E6%9C%AC/" itemprop="commentCount"></span>
    </a>
  </span>
  
  <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>5.4k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>5 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <blockquote>
<p>本文是对已有的版本更新工具做了ios6至ios7的兼容扩展，其使用方法与原项目工具类似，详细可参照下面的介绍。</p>
</blockquote>
<p><strong>中文版：</strong></p>
<h1 id="Harpy（兼容版）"><a href="#Harpy（兼容版）" class="headerlink" title="Harpy（兼容版）"></a>Harpy（兼容版）</h1><p>git地址：<a href="https://github.com/yangchao0033/Harpy" target="_blank" rel="noopener">https://github.com/yangchao0033/Harpy</a></p>
<p>###(iOS5-9适配版本,基于<a href="https://github.com/ArtSabintsev/Harpy" target="_blank" rel="noopener">ArtSabintsev/Harpy v3.4.5</a>)</p>
<h3 id="提醒用户你的应用有新的可用版本，并且及时的跳转到App-Store进行更新。"><a href="#提醒用户你的应用有新的可用版本，并且及时的跳转到App-Store进行更新。" class="headerlink" title="提醒用户你的应用有新的可用版本，并且及时的跳转到App Store进行更新。"></a>提醒用户你的应用有新的可用版本，并且及时的跳转到App Store进行更新。</h3><h2 id="关于"><a href="#关于" class="headerlink" title="关于"></a>关于</h2><p><strong>Harpy</strong> 将用户手机上已安装的iOS app版本与当前App Store最新可用版本进行检查对比。如果有新的可用版本时，使用弹窗及时提醒用户最新版本信息，并然用户选择是否需要进一步操作。</p>
<a id="more"></a> 

<p>Harry是基于[<a href="http://www.semver.org]">http://www.semver.org]</a>(Semantic Versioning)版本号系统标准执行。</p>
<ul>
<li><code>Semantic Versioning</code>是一个三位数的版本号系统（例如:1.0.0）</li>
<li>Harry同样支持2位数的版本号(例如:1.0)</li>
<li>Harpy同时支持4位数的版本号（例如:1.0.0.0）</li>
</ul>
<h2 id="Swift-支持"><a href="#Swift-支持" class="headerlink" title="Swift 支持"></a>Swift 支持</h2><p>当前兼容版本（iOS5-9）暂时不支持swift</p>
<h2 id="特点"><a href="#特点" class="headerlink" title="特点"></a>特点</h2><!--- [x] CocoaPods Support-->
<ul>
<li><input checked="" disabled="" type="checkbox"> 支持三种类型的弹框样式 (详见 <strong>截图 &amp; Alert Types</strong>)</li>
<li><input checked="" disabled="" type="checkbox"> 提供可选的代理方法 (详见 <strong>Optional Delegate</strong> section)</li>
<li><input checked="" disabled="" type="checkbox"> 本地化支持超过20+语言</li>
</ul>
<h2 id="屏幕截图"><a href="#屏幕截图" class="headerlink" title="屏幕截图"></a>屏幕截图</h2><ul>
<li><strong>左图：</strong>强制用户更新app</li>
<li><strong>中图：</strong>提供可选项是否前往更新</li>
<li><strong>右图：</strong>提供跳过当前版本更新的选项</li>
<li>这些样式全部可以通过<code>HarpyAletType</code>枚举进行控制，详见<code>Harpy.h</code></li>
</ul>
<p><img src="https://github.com/yangchao0033/Harpy/blob/master/samplePictures/4.pic.jpg?raw=true" alt="Forced Update" title="Forced Update"><br><img src="https://github.com/yangchao0033/Harpy/blob/master/samplePictures/5.pic.jpg?raw=true" alt="Optional Update" title="Optional Update"><br><img src="https://github.com/yangchao0033/Harpy/blob/master/samplePictures/3.pic.jpg?raw=true" alt="Skipped Update" title="Optional Update"></p>
<h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><h3 id="手动安装（正在准备CocoaPods）"><a href="#手动安装（正在准备CocoaPods）" class="headerlink" title="手动安装（正在准备CocoaPods）"></a>手动安装（正在准备CocoaPods）</h3><p>将‘Harpy’文件夹拖入到你的项目中，并选择’copy if needed’,包括 <code>Harpy.h</code> 和 <code>Harpy.m</code> 文件</p>
<h2 id="配置"><a href="#配置" class="headerlink" title="配置"></a>配置</h2><ol>
<li>import <strong>Harpy.h</strong> 导入到 AppDelefate 类中 或者 Pre-Complier Header(.pch)文件中</li>
<li>在你的<code>Appdelegate</code>中设置<strong>appID</strong>（必要），<br>设置你的<strong>alertType</strong>（可选）</li>
</ol>
<p>####appID获取方法:</p>
<blockquote>
<p>1、在iTunes中搜索到你的应用：<br><img src="http://upload-images.jianshu.io/upload_images/1445110-070d34ccae81dc53.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="Snip20160707_6.png"><br>2、点击箭头：<br><img src="http://upload-images.jianshu.io/upload_images/1445110-7670e9cddf512bd2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="Snip20160707_5.png"><br>3、从链接中截取字符串<br><a href="https://itunes.apple.com/cn/app/itunes-connect/id376771144?mt=8" target="_blank" rel="noopener">https://itunes.apple.com/cn/app/itunes-connect/id376771144?mt=8</a><br>其中：<code>376771144</code>就是他的<strong>AppID</strong></p>
</blockquote>
<ol start="3">
<li>在你的<code>Appdelegate</code>中调用<code>checkVersion</code>方法，三个检测方法调用位置分别位于Appdelegate的启动的代理方法中，可以自行选择使用<ul>
<li>在 <code>application:didFinishLaunchingWithOptions:</code> 中调用 <code>checkVersion</code></li>
<li>在 <code>applicationDidBecomeActive:</code> 中调用 <code>checkVersionDaily</code>  </li>
<li>在 <code>applicationDidBecomeActive:</code> 中调用 <code>checkVersionWeekly</code> .</li>
</ul>
</li>
</ol>
<figure class="highlight obj-c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br></pre></td><td class="code"><pre><span class="line">- (<span class="built_in">BOOL</span>)application:(<span class="built_in">UIApplication</span> *)application didFinishLaunchingWithOptions:(<span class="built_in">NSDictionary</span> *)launchOptions</span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">	<span class="comment">// 启用Harpy之前确保你的window可用</span></span><br><span class="line">	[<span class="keyword">self</span>.window makeKeyAndVisible];</span><br><span class="line"></span><br><span class="line">	<span class="comment">// 为你的应用设置app id</span></span><br><span class="line">	[[Harpy sharedInstance] setAppID:<span class="string">@"&lt;#app_id#&gt;"</span>];</span><br><span class="line"></span><br><span class="line">	<span class="comment">// 设置 UIAlertController 将要基于哪个控制器显示 （适配iOS8+）</span></span><br><span class="line">	[[Harpy sharedInstance] setPresentingViewController:_window.rootViewController];</span><br><span class="line"></span><br><span class="line">  <span class="comment">// (可选)设置代理来追踪用户点击事件，活着的使用自定义的界面来展示你的信息</span></span><br><span class="line">      [[Harpy sharedInstance] setDelegate:<span class="keyword">self</span>];</span><br><span class="line">	</span><br><span class="line">	<span class="comment">// (可选) 设置alertController的tincolor（iOS8+可用）</span></span><br><span class="line">	[[Harpy sharedInstance] setAlertControllerTintColor:<span class="string">@"&lt;#alert_controller_tint_color#&gt;"</span>];</span><br><span class="line"></span><br><span class="line">	<span class="comment">// (可选) 设置你的应用名</span></span><br><span class="line">	[[Harpy sharedInstance] setAppName:<span class="string">@"&lt;#app_name#&gt;"</span>];</span><br><span class="line"></span><br><span class="line">	 <span class="comment">/* （可选）设置弹框类型 默认为HarpyAlertTypeOption */</span></span><br><span class="line">	[[Harpy sharedInstance] setAlertType:&lt;#alert_type#&gt;];</span><br><span class="line"></span><br><span class="line">	 <span class="comment">/* (可选)如果你的应用只在某些国家或地区可用，你必须使用两个字符的country code来设置应用的可用区域 */</span></span><br><span class="line">	[[Harpy sharedInstance] setCountryCode:<span class="string">@"&lt;#country_code#&gt;"</span>];</span><br><span class="line"></span><br><span class="line">	<span class="comment">/* (可选) 强制指定应用显示语言, 请使用 Harpy.h 中定义的 HarpyLanguage 进行设置。*/</span></span><br><span class="line">	[[Harpy sharedInstance] setForceLanguageLocalization:&lt;#HarpyLanguageConstant#&gt;];</span><br><span class="line"></span><br><span class="line">	<span class="comment">// 执行版本检测</span></span><br><span class="line">	[[Harpy sharedInstance] checkVersion];</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- (<span class="keyword">void</span>)applicationDidBecomeActive:(<span class="built_in">UIApplication</span> *)application</span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">	<span class="comment">/*</span></span><br><span class="line"><span class="comment">		执行每天检测你的app是否需要更新版本，需要在`applicationDidBecomeActive:`执行最合适</span></span><br><span class="line"><span class="comment">		因为这对于的你的应用进如后台很长时间后非常有用。</span></span><br><span class="line"><span class="comment">		</span></span><br><span class="line"><span class="comment">		同时，也会在应用第一次启动时执行版本检测</span></span><br><span class="line"><span class="comment"> 	*/</span></span><br><span class="line">	[[Harpy sharedInstance] checkVersionDaily];</span><br><span class="line"></span><br><span class="line">	<span class="comment">/*</span></span><br><span class="line"><span class="comment">		执行每周检测你的app新版本。同理需要将此代码放置在`applicationDidBecomeActive:`中执行。</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">		同时，也会在应用第一次启动时执行版本检测</span></span><br><span class="line"><span class="comment">	 */</span></span><br><span class="line">	[[Harpy sharedInstance] checkVersionWeekly];</span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- (<span class="keyword">void</span>)applicationWillEnterForeground:(<span class="built_in">UIApplication</span> *)application</span><br><span class="line">&#123;</span><br><span class="line">	<span class="comment">/*</span></span><br><span class="line"><span class="comment">	 执行app新版本检测，放在此是为了让用户从App Sore跳转回来并重新从后台进入你的</span></span><br><span class="line"><span class="comment">	 app，并且没有在从App Store中跳转回来之前更新他们app的时候调用</span></span><br><span class="line"><span class="comment">	 </span></span><br><span class="line"><span class="comment">	 注意：只有当你使用*HarpyAlertTypeForce*样式弹框类型是才使用这种方法</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">	并且会在你第一次启动应用时检测。</span></span><br><span class="line"><span class="comment"> 	*/</span></span><br><span class="line">	[[Harpy sharedInstance] checkVersion];</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">```  </span><br><span class="line">至此设置全部完成！</span><br><span class="line">  </span><br><span class="line">## 为不同的升级类型设置弹窗样式</span><br><span class="line">如果你喜欢为不同的升级类型比如修改(revision)，补丁(patch)，轻微改动(minor)，重大修改(major)等升级类型仅仅添加下面的几行可选代码即可，添加位置必须在调用版本检查的方法（checkVersion）之前</span><br><span class="line"></span><br><span class="line">``` obj-c</span><br><span class="line">	<span class="comment">/* 默认情况下Harpy会设置所有的版本升级样式为HarpyAlertTypeOption */</span></span><br><span class="line">	[[Harpy sharedInstance] setPatchUpdateAlertType:&lt;#alert_type#&gt;];</span><br><span class="line">	[[Harpy sharedInstance] setMinorUpdateAlertType:&lt;#alert_type#&gt;];</span><br><span class="line">	[[Harpy sharedInstance] setMajorUpdateAlertType:&lt;#alert_type#&gt;];</span><br><span class="line">	[[Harpy sharedInstance] setRevisionUpdateAlertType:&lt;#alert_type#&gt;];</span><br></pre></td></tr></table></figure>

<h2 id="可选的代理和代理方法"><a href="#可选的代理和代理方法" class="headerlink" title="可选的代理和代理方法"></a>可选的代理和代理方法</h2><p>如果你想要个处理或者追踪终端用户的的行为，Harpy会为你提供四个代理方法进行监控</p>
<figure class="highlight obj-c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 用户界面展示升级提示对话框</span></span><br><span class="line">- (<span class="keyword">void</span>)harpyDidShowUpdateDialog;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 用户已经点击升级按钮并且进入到App Sotore</span></span><br><span class="line">- (<span class="keyword">void</span>)harpyUserDidLaunchAppStore;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 用户已经点击跳过此次版本更新</span></span><br><span class="line">- (<span class="keyword">void</span>)harpyUserDidSkipVersion;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 用户已经点击取消更行对话框</span></span><br><span class="line">- (<span class="keyword">void</span>)harpyUserDidCancel;</span><br></pre></td></tr></table></figure>

<p>If you would like to use your own UI, please use the following delegate method to obtain the localized update message if a new version is available:<br>如果你想使用自己的UI，如果有可用的新版本，使用下面的代理来获得本地化的升级信息（需要设置AlertTpye为HarpyAlertTypeNone）</p>
<figure class="highlight obj-c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">- (<span class="keyword">void</span>)harpyDidDetectNewVersionWithoutAlert:(<span class="built_in">NSString</span> *)message;</span><br></pre></td></tr></table></figure>
<h2 id="强制本地化"><a href="#强制本地化" class="headerlink" title="强制本地化"></a>强制本地化</h2><p>Harpy 已经本地化了的语言包括 Arabic, Basque, 简体中文, 繁体中文, Danish, Dutch, English, Estonian, French, German, Hebrew, Hungarian, Italian, Japanese, Korean, Latvian, Lithuanian, Malay, Polish, Portuguese (Brazil), Portuguese (Portugal), Russian, Slovenian, Swedish, Spanish, Thai, and Turkish.</p>
<p>你可能想要你的升级对话框<em>永远</em>显示正确的语言，而忽略iOS的语言设置（比如在指定国家发行的app）</p>
<p>你可以使用以下代码实现强制本地化</p>
<figure class="highlight obj-c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[[Harpy sharedInstance] setForceLanguageLocalization&lt;#HarpyLanguageConstant#&gt;];</span><br></pre></td></tr></table></figure>

<h2 id="在App-Store上提交的重要注意事项"><a href="#在App-Store上提交的重要注意事项" class="headerlink" title="在App Store上提交的重要注意事项"></a>在App Store上提交的重要注意事项</h2><p>App Store 审核人员将不会看到升级弹框</p>
<p><strong>English</strong>：</p>
<h1 id="Harpy（Compatible-version-Base-On-ArtSabintsev-Harpy-v3-4-5）"><a href="#Harpy（Compatible-version-Base-On-ArtSabintsev-Harpy-v3-4-5）" class="headerlink" title="Harpy（Compatible version Base On ArtSabintsev/Harpy v3.4.5）"></a>Harpy（Compatible version Base On <a href="https://github.com/ArtSabintsev/Harpy" target="_blank" rel="noopener">ArtSabintsev/Harpy v3.4.5</a>）</h1><h3 id="Notify-users-when-a-new-version-of-your-app-is-available-and-prompt-them-with-the-App-Store-link"><a href="#Notify-users-when-a-new-version-of-your-app-is-available-and-prompt-them-with-the-App-Store-link" class="headerlink" title="Notify users when a new version of your app is available, and prompt them with the App Store link."></a>Notify users when a new version of your app is available, and prompt them with the App Store link.</h3><hr>
<h2 id="About"><a href="#About" class="headerlink" title="About"></a>About</h2><p><strong>Harpy</strong> checks a user’s currently installed version of your iOS app against the version that is currently available in the App Store. If a new version is available, an alert can be presented to the user informing them of the newer version, and giving them the option to update the application.</p>
<p>Harpy is built to work with the [<a href="http://www.semver.org]">http://www.semver.org]</a>(Semantic Versioning) system.</p>
<ul>
<li>Semantic Versioning is a three number versioning system (e.g., 1.0.0)</li>
<li>Harpy also supports two-number versioning (e.g., 1.0)</li>
<li>Harpy also supports four-number versioning (e.g., 1.0.0.0)</li>
</ul>
<h2 id="Swift-Support"><a href="#Swift-Support" class="headerlink" title="Swift Support"></a>Swift Support</h2><ul>
<li>not support yet</li>
</ul>
<h2 id="Features"><a href="#Features" class="headerlink" title="Features"></a>Features</h2><!--- [x] CocoaPods Support-->
<ul>
<li><input checked="" disabled="" type="checkbox"> Three types of alerts (see <strong>Screenshots &amp; Alert Types</strong>)</li>
<li><input checked="" disabled="" type="checkbox"> Optional delegate methods (see <strong>Optional Delegate</strong> section)</li>
<li><input checked="" disabled="" type="checkbox"> Localized for 20+ languages</li>
</ul>
<h2 id="Screenshots"><a href="#Screenshots" class="headerlink" title="Screenshots"></a>Screenshots</h2><ul>
<li>The <strong>left picture</strong> forces the user to update the app.</li>
<li>The <strong>center picture</strong> gives the user the option to update the app.</li>
<li>The <strong>right picture</strong> gives the user the option to skip the current update.</li>
<li>These options are controlled by the <code>HarpyAlertType</code> typede that is found in <code>Harpy.h</code>.</li>
</ul>
<p><img src="https://github.com/ArtSabintsev/Harpy/blob/master/samplePictures/picForcedUpdate.png?raw=true" alt="Forced Update" title="Forced Update"><br><img src="https://github.com/ArtSabintsev/Harpy/blob/master/samplePictures/picOptionalUpdate.png?raw=true" alt="Optional Update" title="Optional Update"><br><img src="https://github.com/ArtSabintsev/Harpy/blob/master/samplePictures/picSkippedUpdate.png?raw=true" alt="Skipped Update" title="Optional Update"></p>
<h2 id="Installation-Instructions"><a href="#Installation-Instructions" class="headerlink" title="Installation Instructions"></a>Installation Instructions</h2><!--### CocoaPods Installation
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br></pre></td><td class="code"><pre><span class="line">pod &#39;Harpy&#39;</span><br><span class="line">&#96;&#96;&#96;--&gt;</span><br><span class="line"></span><br><span class="line">### Manual Installation</span><br><span class="line"></span><br><span class="line">Copy the &#39;Harpy&#39; folder into your Xcode project. It contains the Harpy.h and Harpy.m files.</span><br><span class="line"></span><br><span class="line">## Setup</span><br><span class="line">1. Import **Harpy.h** into your AppDelegate or Pre-Compiler Header (.pch)</span><br><span class="line">1. In your &#96;AppDelegate&#96;, set the **appID**, and optionally, you can set the **alertType**.</span><br><span class="line">1. In your &#96;AppDelegate&#96;, call **only one** of the &#96;checkVersion&#96; methods, as all three perform a check on your application&#39;s first launch. Use either:</span><br><span class="line">    - &#96;checkVersion&#96; in &#96;application:didFinishLaunchingWithOptions:&#96;</span><br><span class="line">    - &#96;checkVersionDaily&#96; in &#96;applicationDidBecomeActive:&#96;.</span><br><span class="line">    - &#96;checkVersionWeekly&#96; in &#96;applicationDidBecomeActive:&#96;.</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#96;&#96;&#96; obj-c</span><br><span class="line">- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">	&#x2F;&#x2F; Present Window before calling Harpy</span><br><span class="line">	[self.window makeKeyAndVisible];</span><br><span class="line"></span><br><span class="line">	&#x2F;&#x2F; Set the App ID for your app</span><br><span class="line">	[[Harpy sharedInstance] setAppID:@&quot;&lt;#app_id#&gt;&quot;];</span><br><span class="line"></span><br><span class="line">	&#x2F;&#x2F; Set the UIViewController that will present an instance of UIAlertController</span><br><span class="line">	[[Harpy sharedInstance] setPresentingViewController:_window.rootViewController];</span><br><span class="line"></span><br><span class="line">  &#x2F;&#x2F; (Optional) Set the Delegate to track what a user clicked on, or to use a custom UI to present your message.</span><br><span class="line">      [[Harpy sharedInstance] setDelegate:self];</span><br><span class="line"></span><br><span class="line">	&#x2F;&#x2F; (Optional) The tintColor for the alertController</span><br><span class="line">	[[Harpy sharedInstance] setAlertControllerTintColor:@&quot;&lt;#alert_controller_tint_color#&gt;&quot;];</span><br><span class="line"></span><br><span class="line">	&#x2F;&#x2F; (Optional) Set the App Name for your app</span><br><span class="line">	[[Harpy sharedInstance] setAppName:@&quot;&lt;#app_name#&gt;&quot;];</span><br><span class="line"></span><br><span class="line">	&#x2F;* (Optional) Set the Alert Type for your app</span><br><span class="line">	 By default, Harpy is configured to use HarpyAlertTypeOption *&#x2F;</span><br><span class="line">	[[Harpy sharedInstance] setAlertType:&lt;#alert_type#&gt;];</span><br><span class="line"></span><br><span class="line">	&#x2F;* (Optional) If your application is not available in the U.S. App Store, you must specify the two-letter</span><br><span class="line">	 country code for the region in which your applicaiton is available. *&#x2F;</span><br><span class="line">	[[Harpy sharedInstance] setCountryCode:@&quot;&lt;#country_code#&gt;&quot;];</span><br><span class="line"></span><br><span class="line">	&#x2F;* (Optional) Overrides system language to predefined language.</span><br><span class="line">	 Please use the HarpyLanguage constants defined in Harpy.h. *&#x2F;</span><br><span class="line">	[[Harpy sharedInstance] setForceLanguageLocalization:&lt;#HarpyLanguageConstant#&gt;];</span><br><span class="line"></span><br><span class="line">	&#x2F;&#x2F; Perform check for new version of your app</span><br><span class="line">	[[Harpy sharedInstance] checkVersion];</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- (void)applicationDidBecomeActive:(UIApplication *)application</span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">	&#x2F;*</span><br><span class="line">	 Perform daily check for new version of your app</span><br><span class="line">	 Useful if user returns to you app from background after extended period of time</span><br><span class="line"> 	 Place in applicationDidBecomeActive:</span><br><span class="line"></span><br><span class="line"> 	 Also, performs version check on first launch.</span><br><span class="line"> 	*&#x2F;</span><br><span class="line">	[[Harpy sharedInstance] checkVersionDaily];</span><br><span class="line"></span><br><span class="line">	&#x2F;*</span><br><span class="line">	 Perform weekly check for new version of your app</span><br><span class="line">	 Useful if you user returns to your app from background after extended period of time</span><br><span class="line">	 Place in applicationDidBecomeActive:</span><br><span class="line"></span><br><span class="line">	 Also, performs version check on first launch.</span><br><span class="line">	 *&#x2F;</span><br><span class="line">	[[Harpy sharedInstance] checkVersionWeekly];</span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- (void)applicationWillEnterForeground:(UIApplication *)application</span><br><span class="line">&#123;</span><br><span class="line">	&#x2F;*</span><br><span class="line">	 Perform check for new version of your app</span><br><span class="line">	 Useful if user returns to you app from background after being sent tot he App Store,</span><br><span class="line">	 but doesn&#39;t update their app before coming back to your app.</span><br><span class="line"></span><br><span class="line"> 	 ONLY USE THIS IF YOU ARE USING *HarpyAlertTypeForce*</span><br><span class="line"></span><br><span class="line"> 	 Also, performs version check on first launch.</span><br><span class="line"> 	*&#x2F;</span><br><span class="line">	[[Harpy sharedInstance] checkVersion];</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>And you’re all set!</p>
<h2 id="Differentiated-Alerts-for-Patch-Minor-and-Major-Updates"><a href="#Differentiated-Alerts-for-Patch-Minor-and-Major-Updates" class="headerlink" title="Differentiated Alerts for Patch, Minor, and Major Updates"></a>Differentiated Alerts for Patch, Minor, and Major Updates</h2><p>If you would like to set a different type of alert for revision, patch, minor, and/or major updates, simply add one or all of the following <em>optional</em> lines to your setup <em>before</em> calling any of the <code>checkVersion</code> methods:</p>
<figure class="highlight obj-c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* By default, Harpy is configured to use HarpyAlertTypeOption for all version updates */</span></span><br><span class="line">[[Harpy sharedInstance] setPatchUpdateAlertType:&lt;#alert_type#&gt;];</span><br><span class="line">[[Harpy sharedInstance] setMinorUpdateAlertType:&lt;#alert_type#&gt;];</span><br><span class="line">[[Harpy sharedInstance] setMajorUpdateAlertType:&lt;#alert_type#&gt;];</span><br><span class="line">[[Harpy sharedInstance] setRevisionUpdateAlertType:&lt;#alert_type#&gt;];</span><br></pre></td></tr></table></figure>

<h2 id="Optional-Delegate-and-Delegate-Methods"><a href="#Optional-Delegate-and-Delegate-Methods" class="headerlink" title="Optional Delegate and Delegate Methods"></a>Optional Delegate and Delegate Methods</h2><p>If you’d like to handle or track the end-user’s behavior, four delegate methods have been made available to you:</p>
<figure class="highlight obj-c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// User presented with update dialog</span></span><br><span class="line">- (<span class="keyword">void</span>)harpyDidShowUpdateDialog;</span><br><span class="line"></span><br><span class="line"><span class="comment">// User did click on button that launched App Store.app</span></span><br><span class="line">- (<span class="keyword">void</span>)harpyUserDidLaunchAppStore;</span><br><span class="line"></span><br><span class="line"><span class="comment">// User did click on button that skips version update</span></span><br><span class="line">- (<span class="keyword">void</span>)harpyUserDidSkipVersion;</span><br><span class="line"></span><br><span class="line"><span class="comment">// User did click on button that cancels update dialog</span></span><br><span class="line">- (<span class="keyword">void</span>)harpyUserDidCancel;</span><br></pre></td></tr></table></figure>

<p>If you would like to use your own UI, please use the following delegate method to obtain the localized update message if a new version is available:</p>
<figure class="highlight obj-c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">- (<span class="keyword">void</span>)harpyDidDetectNewVersionWithoutAlert:(<span class="built_in">NSString</span> *)message;</span><br></pre></td></tr></table></figure>

<h2 id="Force-Localization"><a href="#Force-Localization" class="headerlink" title="Force Localization"></a>Force Localization</h2><p>Harpy has localizations for Arabic, Basque, Chinese (Simplified), Chinese (Traditional), Danish, Dutch, English, Estonian, French, German, Hebrew, Hungarian, Italian, Japanese, Korean, Latvian, Lithuanian, Malay, Polish, Portuguese (Brazil), Portuguese (Portugal), Russian, Slovenian, Swedish, Spanish, Thai, and Turkish.</p>
<p>You may want the update dialog to <em>always</em> appear in a certain language, ignoring iOS’s language setting (e.g. apps released in a specific country).</p>
<p>You can enable it like this:</p>
<figure class="highlight obj-c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[[Harpy sharedInstance] setForceLanguageLocalization&lt;#HarpyLanguageConstant#&gt;];</span><br></pre></td></tr></table></figure>

<h2 id="Important-Note-on-App-Store-Submissions"><a href="#Important-Note-on-App-Store-Submissions" class="headerlink" title="Important Note on App Store Submissions"></a>Important Note on App Store Submissions</h2><p>The App Store reviewer will <strong>not</strong> see the alert.</p>
<h2 id="Created-and-maintained-by"><a href="#Created-and-maintained-by" class="headerlink" title="Created and maintained by"></a>Created and maintained by</h2><p><a href="http://www.sabintsev.com/" target="_blank" rel="noopener">Arthur Ariel Sabintsev</a></p>

    </div>

    
    
    
        

  <div class="followme">
    <p>欢迎关注我的其它发布渠道</p>

    <div class="social-list">

        <div class="social-item">
          <a target="_blank" class="social-link" href="https://www.jianshu.com/u/f37a8f0ba6f8">
            <span class="icon">
              <i class="fas fa-book"></i>
            </span>

            <span class="label">简书</span>
          </a>
        </div>
    </div>
  </div>


      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E6%8F%90%E7%A4%BA/" rel="tag"># 版本更新提示</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2016/01/11/%E5%AE%8F%E5%AE%9A%E4%B9%89%E9%AB%98%E7%BA%A7%E7%94%A8%E6%B3%95/" rel="prev" title="宏定义高级用法">
      <i class="fa fa-chevron-left"></i> 宏定义高级用法
    </a></div>
      <div class="post-nav-item">
    <a href="/2016/01/27/CoreText%E5%9F%BA%E7%A1%80%E6%A6%82%E5%BF%B5%EF%BC%88%E6%89%AB%E7%9B%B2%E7%AF%87%EF%BC%89/" rel="next" title="ReactiveCocoa 设计规范">
      ReactiveCocoa 设计规范 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#Harpy（兼容版）"><span class="nav-number">1.</span> <span class="nav-text">Harpy（兼容版）</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#提醒用户你的应用有新的可用版本，并且及时的跳转到App-Store进行更新。"><span class="nav-number">1.0.1.</span> <span class="nav-text">提醒用户你的应用有新的可用版本，并且及时的跳转到App Store进行更新。</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#关于"><span class="nav-number">1.1.</span> <span class="nav-text">关于</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Swift-支持"><span class="nav-number">1.2.</span> <span class="nav-text">Swift 支持</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#特点"><span class="nav-number">1.3.</span> <span class="nav-text">特点</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#屏幕截图"><span class="nav-number">1.4.</span> <span class="nav-text">屏幕截图</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#安装"><span class="nav-number">1.5.</span> <span class="nav-text">安装</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#手动安装（正在准备CocoaPods）"><span class="nav-number">1.5.1.</span> <span class="nav-text">手动安装（正在准备CocoaPods）</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#配置"><span class="nav-number">1.6.</span> <span class="nav-text">配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#可选的代理和代理方法"><span class="nav-number">1.7.</span> <span class="nav-text">可选的代理和代理方法</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#强制本地化"><span class="nav-number">1.8.</span> <span class="nav-text">强制本地化</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#在App-Store上提交的重要注意事项"><span class="nav-number">1.9.</span> <span class="nav-text">在App Store上提交的重要注意事项</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Harpy（Compatible-version-Base-On-ArtSabintsev-Harpy-v3-4-5）"><span class="nav-number">2.</span> <span class="nav-text">Harpy（Compatible version Base On ArtSabintsev&#x2F;Harpy v3.4.5）</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Notify-users-when-a-new-version-of-your-app-is-available-and-prompt-them-with-the-App-Store-link"><span class="nav-number">2.0.1.</span> <span class="nav-text">Notify users when a new version of your app is available, and prompt them with the App Store link.</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#About"><span class="nav-number">2.1.</span> <span class="nav-text">About</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Swift-Support"><span class="nav-number">2.2.</span> <span class="nav-text">Swift Support</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Features"><span class="nav-number">2.3.</span> <span class="nav-text">Features</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Screenshots"><span class="nav-number">2.4.</span> <span class="nav-text">Screenshots</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Installation-Instructions"><span class="nav-number">2.5.</span> <span class="nav-text">Installation Instructions</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="SuperYang"
      src="https://tva2.sinaimg.cn/crop.259.17.290.290.180/c2abdfa9jw8ez7appr3p2j20g40a2t91.jpg?KID=imgbed,tva&Expires=1594186820&ssig=BdxhDdi1Ti">
  <p class="site-author-name" itemprop="name">SuperYang</p>
  <div class="site-description" itemprop="description">牛肉炒饭不要香菜，老板收钱</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">39</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">5</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">31</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/yangchao0033" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;yangchao0033" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:ygrfwyc@gmail.com" title="E-Mail → mailto:ygrfwyc@gmail.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://weibo.com/yangchao0033" title="Weibo → https:&#x2F;&#x2F;weibo.com&#x2F;yangchao0033" rel="noopener" target="_blank"><i class="fab fa-weibo fa-fw"></i>Weibo</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://www.jianshu.com/u/f37a8f0ba6f8" title="简书 → https:&#x2F;&#x2F;www.jianshu.com&#x2F;u&#x2F;f37a8f0ba6f8" rel="noopener" target="_blank"><i class="fas fa-book fa-fw"></i>简书</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://t.me/superYang0033" title="Telegram → https:&#x2F;&#x2F;t.me&#x2F;superYang0033" rel="noopener" target="_blank"><i class="fab fa-telegram fa-fw"></i>Telegram</a>
      </span>
  </div>



      </div>

      
        <div id="music163player">
        <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=350 height=86 src="//music.163.com/outchain/player?type=2&id=31473269&auto=0&height=66">
        </iframe>
        </div>
    </div>

    

  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">SuperYang</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
    <span title="站点总字数">157k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">2:23</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  
  <script>
    (function(){
      var canonicalURL, curProtocol;
      //Get the <link> tag
      var x=document.getElementsByTagName("link");
		//Find the last canonical URL
		if(x.length > 0){
			for (i=0;i<x.length;i++){
				if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){
					canonicalURL=x[i].href;
				}
			}
		}
    //Get protocol
	    if (!canonicalURL){
	    	curProtocol = window.location.protocol.split(':')[0];
	    }
	    else{
	    	curProtocol = canonicalURL.split(':')[0];
	    }
      //Get current URL if the canonical URL does not exist
	    if (!canonicalURL) canonicalURL = window.location.href;
	    //Assign script content. Replace current URL with the canonical URL
      !function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();
  </script>




  
<script src="/js/local-search.js"></script>













  

  

  

  <script async src="/js/cursor/fireworks.js"></script>



<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : true,
      notify     : true,
      appId      : 'zizRqalUJY55Xc5oBJKbhxpV-gzGzoHsz',
      appKey     : '64gPcVi8lIA8zVGpBSEk7uKu',
      placeholder: "留言板无需注册登录，快来评论吧。。",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : true,
      lang       : '' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
